* alloc.c (Fmemory_limit): Cast sbrk's returned value to char *.
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 15 Mar 2011 22:37:59 +0000 (15:37 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 15 Mar 2011 22:37:59 +0000 (15:37 -0700)
src/ChangeLog
src/alloc.c

index 3f0925a9d194c0062cb19f14f83ad86c64187fbd..5b62ba5b8c8104338b15c1762e4b180e68fda80c 100644 (file)
@@ -10,6 +10,7 @@
        needed otherwise.
        (CHECK_ALLOCATED): Define only if GC_CHECK_MARKED_OBJECTS.
        (GC_STRING_CHARS): Remove; not used.
+       (Fmemory_limit): Cast sbrk's returned value to char *.
 
        * lisp.h (check_cons_list): Declare if GC_CHECK_CONS_LIST; this
        avoids undefined behavior in theory.
index 7fa2790cb1ebd7b77deeb69d28f7c585cc10b0b8..6262e002ed3731cc88cfb068ac8cc2dfb6adab4c 100644 (file)
@@ -6057,7 +6057,7 @@ We divide the value by 1024 to make sure it fits in a Lisp integer.  */)
 {
   Lisp_Object end;
 
-  XSETINT (end, (EMACS_INT) sbrk (0) / 1024);
+  XSETINT (end, (EMACS_INT) (char *) sbrk (0) / 1024);
 
   return end;
 }